package logic

import (
	"context"
	user "onerk4/zk2/common/proto"
	"onerk4/zk2/service/server"
)

type UserServer struct {
	user.UnimplementedUserServer
}

func (u UserServer) UserLogin(ctx context.Context, req *user.UserLoginRequest) (*user.UserLoginResponse, error) {
	login, err := server.UserLogin(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}

func (u UserServer) SendSms(ctx context.Context, req *user.SendSmsRequest) (*user.SendSmsResponse, error) {
	login, err := server.SendSms(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}

func (u UserServer) SearchEnterpriseData(ctx context.Context, req *user.SearchEnterpriseDataRequest) (*user.SearchEnterpriseDataResponse, error) {
	login, err := server.SearchEnterpriseData(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
